package com.wjy.rbac.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wjy.rbac.entity.RequestUrlB;
import com.wjy.rbac.mapper.RequestUrlBMapper;
import com.wjy.rbac.service.IRequestUrlBService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author ybxxszl
 * @since 2019-04-12
 */
@Service
public class RequestUrlBServiceImpl extends ServiceImpl<RequestUrlBMapper, RequestUrlB> implements IRequestUrlBService {

    @Override
    public void insert(List<RequestUrlB> requestUrlBs) {
        saveBatch(requestUrlBs);
    }

    @Override
    public void deleteByRequestUrlId(String requestUrlId) {
        Map<String, Object> columnMap = new HashMap<String, Object>();
        columnMap.put(RequestUrlB.REQUEST_URL_ID, requestUrlId);
        removeByMap(columnMap);
    }

    @Override
    public List<RequestUrlB> getByRequestUrlId(String requestUrlId) {
        Map<String, Object> columnMap = new HashMap<String, Object>();
        columnMap.put(RequestUrlB.REQUEST_URL_ID, requestUrlId);
        List<RequestUrlB> requestUrlBList = (List<RequestUrlB>) listByMap(columnMap);
        return requestUrlBList;
    }

}
